#include "WorkpieceE452.h"
#include <QDebug>
#include <QThread>

#include <unistd.h>

WorkpieceE452::WorkpieceE452()
{
    m_thread = std::thread(&Workpiece::ProcessData,
                           this);
}

void WorkpieceE452::CacheData(int workpieceId,
                              int pictureId)
{
    qDebug() << "current thread id: " << QThread::currentThreadId;
    qDebug() << "cache data E452: "
             << workpieceId
             << " "
             << pictureId;
}

void WorkpieceE452::ProcessData()
{
    while(true) {
        emit MesurementCalResponse(10, 10);
        sleep(1);
    }
}

bool WorkpieceE452::SetTemplatePath(const std::string &path)
{
    return true;
}

void WorkpieceE452::SetStandardVal(const std::map<std::string, float> &standardValMap)
{
    return;
}
